version: "3.7"

networks:
  backend-network:
    driver: bridge
    ipam:
      config:
        - subnet: ${BACKEND_SUBNET}

services:
  gnucobol:
    container_name: cobol
    build:
      context: ./gnucobol
      dockerfile: Dockerfile
    working_dir: ${CONTAINER_PATH}
    tty: true
    volumes:
      - ${HOST_PATH}:${CONTAINER_PATH}
    extra_hosts:
      - "host.docker.internal:host-gateway"
    networks:
      backend-network:
        ipv4_address: ${COBOL_IP}
